Remove GtkFileChooserEntry:local-only
authorEmmanuele Bassi <ebassi@gnome.org>
Sat, 22 Feb 2020 15:20:53 +0000 (15:20 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Sat, 22 Feb 2020 15:22:06 +0000 (15:22 +0000)
We don't use it any more in GtkFileChooserWidget.

gtk/gtkfilechooserentry.c
gtk/gtkfilechooserentry.h
gtk/gtkfilechooserwidget.c

index 633ccbb4b218fd04e10e410f30d25c9c578c4933..60d6e3bff4b61afd0f5d951fc897c831b3f35504 100644 (file)
@@ -64,7 +64,6 @@ struct _GtkFileChooserEntry
   guint complete_on_load : 1;
   guint eat_tabs       : 1;
   guint eat_escape     : 1;
-  guint local_only     : 1;
 };
 
 enum
@@ -273,8 +272,6 @@ _gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry)
   GtkEntryCompletion *comp;
   GtkCellRenderer *cell;
 
-  chooser_entry->local_only = FALSE;
-
   g_object_set (chooser_entry, "truncate-multiline", TRUE, NULL);
 
   comp = gtk_entry_completion_new ();
@@ -692,11 +689,6 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
                        GFile               *folder_file,
                       char                *dir_part)
 {
-  if (folder_file &&
-      chooser_entry->local_only
-      && !_gtk_file_has_native_path (folder_file))
-    folder_file = NULL;
-
   if (((chooser_entry->current_folder_file
        && folder_file
        && g_file_equal (folder_file, chooser_entry->current_folder_file))
@@ -1059,20 +1051,6 @@ _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry)
   gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (gint) len);
 }
 
-void
-_gtk_file_chooser_entry_set_local_only (GtkFileChooserEntry *chooser_entry,
-                                        gboolean             local_only)
-{
-  chooser_entry->local_only = local_only;
-  refresh_current_folder_and_file_part (chooser_entry);
-}
-
-gboolean
-_gtk_file_chooser_entry_get_local_only (GtkFileChooserEntry *chooser_entry)
-{
-  return chooser_entry->local_only;
-}
-
 void
 _gtk_file_chooser_entry_set_file_filter (GtkFileChooserEntry *chooser_entry,
                                          GtkFileFilter       *filter)
index 732a87a741cbc122c6dc357f29710a5e4d391831..fb6725e9c9f580f2831a0d43dff0e7090dd8fbcb 100644 (file)
@@ -43,9 +43,6 @@ const gchar *      _gtk_file_chooser_entry_get_file_part      (GtkFileChooserEnt
 gboolean           _gtk_file_chooser_entry_get_is_folder      (GtkFileChooserEntry *chooser_entry,
                                                               GFile               *file);
 void               _gtk_file_chooser_entry_select_filename    (GtkFileChooserEntry *chooser_entry);
-void               _gtk_file_chooser_entry_set_local_only     (GtkFileChooserEntry *chooser_entry,
-                                                               gboolean             local_only);
-gboolean           _gtk_file_chooser_entry_get_local_only     (GtkFileChooserEntry *chooser_entry);
 void               _gtk_file_chooser_entry_set_file_filter    (GtkFileChooserEntry *chooser_entry,
                                                                GtkFileFilter       *filter);
 
index 17d0a7ab54da3fe4d8c640dd3518fd530cef378b..a6e835c5e0625565bf795de3dc5ffa8bd9fd7f6c 100644 (file)
@@ -2461,7 +2461,6 @@ location_entry_setup (GtkFileChooserWidget *impl)
   g_signal_connect_swapped (priv->location_entry, "hide-entry",
                             G_CALLBACK (location_entry_close_clicked), impl);
 
-  _gtk_file_chooser_entry_set_local_only (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), FALSE);
   _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->action);
   _gtk_file_chooser_entry_set_file_filter (GTK_FILE_CHOOSER_ENTRY (priv->location_entry),
                                            priv->current_filter);